home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // this proc points the tool properties
- // window to the current polyAppend context
-
- global proc callPolyAppendFacetCtx(string $in, string $toolName)
- {
- if ($in == "Normalize") $inval = 1;
- else if ($in == "Unitize") $inval = 2;
- else $inval = 0; // Default should go here.
- eval("polyAppendFacetCtx -e -tx " + $inval + " " + $toolName);
- }
-
- global proc changeMaxPointsValueAppend(int $val, string $toolName)
- {
- if ($val < 3)
- {
- $val = -1;
- intSliderGrp -e -v $val maxPointsSlider;
- disable -v false subdSld;
- }
- else {
- polyAppendFacetCtx -e -s 1 $toolName;
- intSliderGrp -e -v 1 subdSld;
- disable subdSld;
- }
- eval("polyAppendFacetCtx -e -mp " + $val + " " + $toolName);
- }
-
- global proc polyAppendValues ( string $toolName )
- {
- string $name = "polyAppend";
- string $parent = (`toolPropertyWindow -q -location` + "|" + $name);
- setParent $parent;
-
- // operation
- //
- int $mode = `polyAppendFacetCtx -q -ap $toolName`;
- if( $mode )
- radioButtonGrp -e -sl 2 newFacetRadio; // append
- else
- radioButtonGrp -e -sl 1 newFacetRadio; // create
- radioButtonGrp -e
- -on1 ("polyAppendFacetCtx -e -ap false " +$toolName)
- -on2 ("polyAppendFacetCtx -e -ap true " +$toolName)
- newFacetRadio;
-
- // Subdivisions
- //
- intSliderGrp -e
- -v `polyAppendFacetCtx -q -s $toolName`
- -cc ("polyAppendFacetCtx -e -s #1 " +$toolName)
- subdSld;
- int $maxP = `polyAppendFacetCtx -q -mp $toolName`;
- if ($maxP < 3)
- disable -v false subdSld;
- else
- disable subdSld;
-
- // Max points
- intSliderGrp -e
- -v `polyAppendFacetCtx -q -mp $toolName`
- -cc ("changeMaxPointsValueAppend #1 " + $toolName)
- maxPointsSlider;
-
- // Texture
- //
- // checkBox -e
- int $val = `polyAppendFacetCtx -q -tx $toolName` + 1;
- optionMenuGrp -edit
- -sl $val
- -cc ("callPolyAppendFacetCtx #1 " +$toolName)
- textureBox;
-
- // Rotation
- //
- floatSliderGrp -e
- -en `polyAppendFacetCtx -q -isr $toolName`
- -v `polyAppendFacetCtx -q -r $toolName`
- -cc ("polyAppendFacetCtx -e -r #1 " +$toolName)
- -dc ("polyAppendFacetCtx -e -r #1 " +$toolName)
- angSld;
-
- // Planar constraint
- //
- checkBoxGrp -e
- -value1 `polyAppendFacetCtx -q -pc $toolName`
- -on1 togglePolyPlanarConstraints
- -of1 togglePolyPlanarConstraints
- planarBox;
-
- string $helpTag= "AppendtoPolygonTool";
- toolPropertySetCommon $toolName "polyAppendFacet.xpm" $helpTag;
- toolPropertySelect $name;
- }
-